export const backTop = {
  data() {
    return {
      isBackTopShow: false,//是否显示回到顶部按钮
    }
  },
  methods: {
    backTopClick(scroll) {
      /*      console.log(scroll);
            scroll.backTopClick(0, 0);*/
      if (!this.$route.path.indexOf("/home")) {
        this.$refs.scroll.backTopClick(0, 0);
      } else if (!this.$route.path.indexOf("/detail")) {
        this.$refs.detailscroll.backTopClick(0, 0);
      }
    },
    listenShowBackTop(position) {
      this.isBackTopShow = (-position.y) > 1000
    },
  }
}
